package com.house.house.web;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.house.house.entity.House;
import com.house.house.entity.Owner;
import com.house.house.entity.dto.HouseDto;
import com.house.house.entity.dto.OwnerDto;
import com.house.house.service.IHouseService;
import com.house.house.service.IOwnerService;
import com.house.house.util.enums.Sex;
import com.house.house.util.enums.State;

@Controller
@RequestMapping("/owner")
public class OwnerController {
	@Autowired
	private IOwnerService ownerService;
	
	@RequestMapping("/save")
	public @ResponseBody String save() {
		
		ownerService.save();
		return "success";
	}
	
//	@RequestMapping("/findOne")
//	public @ResponseBody OwnerDto findOne(@RequestParam Long id) {
//		Owner owner = ownerService.findOne(id);
//		owner.getHouse();
//		OwnerDto ownerDto = new OwnerDto();
//		ownerDto.setHouseName(houseName);
//		Long ownerId = house.getOwner().getOwnerId();
//		Owner owner = ownerService.findOne(ownerId);
//		houseDto.setOwnerName(owner.getOwnerName());
//		return houseDto;
//		
//	}
}
